﻿@{
    Layout = "~/Areas/PawRoot/Views/Shared/PawRootEdit.cshtml";
}

@model NoteDisPlayImg

@section HeadCss{
}

<div class="form-horizontal">
    <!--展图标题-->
    <div class="form-group">
        <label class="col-sm-2 control-label">展图标题：</label>
        <div class="col-sm-5">
            <input type="text" class="form-control" id="title" value="@Model.DTitle" placeholder="不填代表默认标题...">
        </div>
        <label class="lot-blue">最大长度: 50 字符</label>
    </div>
    <!--数据状态-->
    <div class="form-group">
        <label class="col-sm-2 control-label">数据状态：</label>
        <div class="col-sm-6">
            <select id="dataStatus" class="form-control">
                @{
                    if (Model.DataStatus == StatusEnum.Deteled)
                    {
                        <option value="99">已删除</option>
                        <option value="1">未删除</option>
                    }
                    else
                    {
                        <option value="1">未删除</option>
                        <option value="99">已删除</option>
                    }
                }
            </select>
        </div>
    </div>
    <!--展览小图-->
    <div class="form-group">
        <label class="col-sm-2 control-label" style="padding-top:13px;">展览小图：</label>
        <div class="col-sm-5">
            <span style="float:left;width:160px;"><span id="lot-uploader"></span></span><img id="displayPic" src="@Model.DPicUrl" style="width:60px;height:33px;" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">网站尺寸：</label>
        <div class="col-sm-5">
            <label style="padding-right:1em" class="control-label lot-red">185*166</label>
            <label style="padding-right:1em" class="control-label">445*293</label>
            <label style="padding-right:1em" class="control-label lot-red">652*428</label>
            <label style="padding-right:1em" class="control-label">765*500</label>
            <button id="seeImg" class="btn btn-primary">点我预览图片</button>
        </div>
        <label class="lot-blue">图片没有太大变形即可提交</label>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label"></label>
        <div class="col-sm-5" id="imgview">
            <div><img src="@Model.DPicUrl" alt="185*166" style="width:185px;height:166px;" /></div><div><img src="@Model.DPicUrl" alt="445*293" style="width:445px;height:293px;" /></div><div><img src="@Model.DPicUrl" alt="652*428" style="width:652px;height:428px;" /></div><div><img src="@Model.DPicUrl" alt="765*500" style="width:765px;height:500px;" /></div>
        </div>
    </div>
    <!--表单提交-->
    <div class="form-group">
        <label class="col-sm-2"></label>
        <div class="col-sm-6">
            <input type="hidden" id="dId" value="@Model.DId" />
            <button id="form-success" class="btn btn-success lot-form-btn">提 交 图 片</button>
            <button id="form-gohome" class="btn btn-success lot-form-btn">返 回 列 表</button>
        </div>
    </div>
</div>

@section JsScript{
    <script src="/Areas/PawRoot/assets/js/disphoto.min.js" async></script>
    <script type="text/javascript">
        $('#seeImg').click(function () {
            var imgSrc = $('#displayPic').attr('src');
            $('#imgview').html('<div><img src="' + imgSrc + '" alt="185*166" style="width:185px;height:166px;" /></div><div><img src="' + imgSrc + '" alt="445*293" style="width:445px;height:293px;" /></div><div><img src="' + imgSrc + '" alt="652*428" style="width:652px;height:428px;" /></div><div><img src="' + imgSrc + '" alt="765*500" style="width:765px;height:500px;" /></div>');
        });
        //提交表单
        $('#form-success').click(function () {
            ajaxToDisPhoto(true);
        });
    </script>
}
